﻿using System.Configuration;
using EFMetaProvider;
using EFProviderWrapperToolkit;

namespace EFMetaProvider
{
    /// <summary>
    /// Default configuration settings for EFMetaProvider.
    /// </summary>
    public static class EFMetaProviderConfiguration
    {
        /// <summary>
        /// Initializes static members of the EFCachingProviderConfiguration class.
        /// </summary>
        static EFMetaProviderConfiguration()
        {
            DefaultWrappedProvider = ConfigurationManager.AppSettings["EFMetaProvider.wrappedProvider"];
        }

        /// <summary>
        /// Gets or sets the default wrapped provider.
        /// </summary>
        /// <value>The default wrapped provider.</value>
        public static string DefaultWrappedProvider { get; set; }

        /// <summary>
        /// Registers the provider factory 
        /// </summary>
        public static void RegisterProvider()
        {
			DbProviderFactoryBase.RegisterProvider("EF Metadata Data Provider", "EFMetaProvider", "description", typeof(EFMetaProviderFactory));
        }
    }
}
